home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / tools / sharp / sxwork1i.lzh / SXWORK1.XDF / INCLUDE / DIALOG.H < prev    next >
Text File  |  1994-02-20  |  3KB  |  134 lines

  1. /*
  2.  * dialog.h X68k SX_SYSTEM ver 2.01 Copyright 1994 SHARP/First Class Technology
  3.  */
  4. #ifndef __DIALOG_H
  5. #define __DIALOG_H
  6.  
  7. #ifndef __SXDEF2_H
  8. #include <sxdef2.h>
  9. #endif
  10. #ifndef __WINDOW_H
  11. #include <window.h>
  12. #endif
  13.  
  14. #ifdef FORWORD
  15. #define __PROTO_TYPE
  16. #endif
  17. #ifdef __STDC__
  18. #define __PROTO_TYPE
  19. #endif
  20.  
  21. typedef struct DItem    DItem;
  22. typedef struct DIList    DIList;
  23. typedef struct DLOG    DLOG;
  24. typedef struct DIList    DITL;
  25. /*
  26.  *    ダイアログマン (Dialog Man)
  27.  */
  28. #define D_USER        0x00
  29. #define D_CHRBTN    0x04
  30. #define D_RADBTN    0x05
  31. #define D_CHKBOX    0x06
  32. #define D_RSCITM    0x07
  33. #define D_STCTXT    0x08
  34. #define D_EDTTXT    0x10
  35. #define D_ICNITM    0x20
  36. #define D_PICITM    0x40
  37. #define D_DISABL    0x80
  38.  
  39. enum ErrorType {
  40.     D_CONFIRM    = 1,
  41.     D_YESNO        = 4,
  42.     D_SAVE,
  43.     D_EXEC,
  44.     D_CONT
  45. };
  46.  
  47. #define D_YELLOW    0
  48. #define D_RED        (1 << 8)
  49.  
  50. struct Dialog {
  51.     Window window;
  52.     DIList **itemList;
  53.     TEdit **tEdit;
  54.     short edit;
  55.     short eOpen;
  56.     short rsv;
  57. };
  58.  
  59. struct DItem {
  60.     Handle item;
  61.     Rect bounds;
  62.     unsigned char type;
  63.     unsigned char size;
  64.     unsigned char data[_VARLEN];    /* ここは可変長データの先頭    */
  65. };
  66.  
  67. struct DIList {
  68.     short number;
  69.     DItem items[_VARLEN];        /* ここは可変長データの先頭    */
  70. };
  71.  
  72. struct DLOG {
  73.     Rect bounds;
  74.     short defID;
  75.     short visible;
  76.     short close;
  77.     long taskID;
  78.     short itemID;
  79.     LASCII title;
  80. };
  81.  
  82. #ifdef __PROTO_TYPE
  83.  
  84. void DMInit(void);
  85. void DMFontSet(int);
  86. Dialog *DMOpen(Dialog *, Rect *, const _LASCII, BOOLEAN, int, Window *, BOOLEAN, long, _Handle);
  87. Dialog *DMRefer(int, Dialog *, Window *);
  88. int DMClose(Dialog *);
  89. int DMDispose(Dialog *);
  90. int DMControl(int (*)(Dialog *, Event *));
  91. int DMDraw(Dialog *);
  92. int DIGet(Dialog *, int, short *, Handle *, Rect *);
  93. int DISet(Dialog *, int, short, Handle, Rect *);
  94. int DITGet(short, Handle, _LASCII);
  95. int DITSet(short, Handle, const _LASCII);
  96. int DITSelect(Dialog *, int, long, long);
  97. int DIUpdate(Dialog *, Region **);
  98. int DMBeep(int);
  99. int DIHide(Dialog *, int);
  100. int DIShow(Dialog *, int);
  101. int DMError(int, const char *);
  102. int DMWaitOpen(void);
  103. int DMWaitClose(void);
  104. int DMWaitWhile(void);
  105.  
  106. #undef __PROTO_TYPE
  107. #else
  108.  
  109. void DMInit();
  110. void DMFontSet();
  111. Dialog *DMOpen();
  112. Dialog *DMRefer();
  113. int DMClose();
  114. int DMDispose();
  115. int DMControl();
  116. int DMDraw();
  117. int DIGet();
  118. int DISet();
  119. int DITGet();
  120. int DITSet();
  121. int DITSelect();
  122. int DIUpdate();
  123. int DMBeep();
  124. int DIHide();
  125. int DIShow();
  126. int DMError();
  127. int DMWaitOpen();
  128. int DMWaitClose();
  129. int DMWaitWhile();
  130.  
  131. #endif __PROTO_TYPE
  132.  
  133. #endif __DIALOG_H
  134.